home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / jeopke / jeopardy.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-09-06  |  15.1 KB  |  534 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Jeopardy Scorekeeper"
  4.    ClientHeight    =   4800
  5.    ClientLeft      =   1590
  6.    ClientTop       =   1725
  7.    ClientWidth     =   6855
  8.    Height          =   5490
  9.    Icon            =   JEOPARDY.FRX:0000
  10.    Left            =   1530
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   4800
  14.    ScaleWidth      =   6855
  15.    Top             =   1095
  16.    Width           =   6975
  17.    Begin CommandButton Command1 
  18.       Caption         =   "500"
  19.       FontBold        =   -1  'True
  20.       FontItalic      =   0   'False
  21.       FontName        =   "MS Sans Serif"
  22.       FontSize        =   18
  23.       FontStrikethru  =   0   'False
  24.       FontUnderline   =   0   'False
  25.       Height          =   615
  26.       Index           =   5
  27.       Left            =   600
  28.       TabIndex        =   4
  29.       Top             =   3120
  30.       Width           =   1095
  31.    End
  32.    Begin CommandButton Command1 
  33.       Caption         =   "400"
  34.       FontBold        =   -1  'True
  35.       FontItalic      =   0   'False
  36.       FontName        =   "MS Sans Serif"
  37.       FontSize        =   18
  38.       FontStrikethru  =   0   'False
  39.       FontUnderline   =   0   'False
  40.       Height          =   615
  41.       Index           =   4
  42.       Left            =   600
  43.       TabIndex        =   3
  44.       Top             =   2400
  45.       Width           =   1095
  46.    End
  47.    Begin CommandButton Command7 
  48.       Caption         =   "Double Jeopardy"
  49.       Height          =   375
  50.       Left            =   4920
  51.       TabIndex        =   15
  52.       Top             =   2040
  53.       Width           =   1695
  54.    End
  55.    Begin CommandButton Command1 
  56.       Caption         =   "300"
  57.       FontBold        =   -1  'True
  58.       FontItalic      =   0   'False
  59.       FontName        =   "MS Sans Serif"
  60.       FontSize        =   18
  61.       FontStrikethru  =   0   'False
  62.       FontUnderline   =   0   'False
  63.       Height          =   615
  64.       Index           =   3
  65.       Left            =   600
  66.       TabIndex        =   2
  67.       Top             =   1680
  68.       Width           =   1095
  69.    End
  70.    Begin CommandButton Command6 
  71.       Caption         =   "Jeopardy"
  72.       Height          =   375
  73.       Left            =   4920
  74.       TabIndex        =   14
  75.       Top             =   1560
  76.       Width           =   1695
  77.    End
  78.    Begin CommandButton Command4 
  79.       Caption         =   "WRONG"
  80.       Height          =   855
  81.       Left            =   3600
  82.       TabIndex        =   7
  83.       Top             =   1560
  84.       Width           =   1215
  85.    End
  86.    Begin CommandButton Command3 
  87.       Caption         =   "RIGHT"
  88.       Height          =   855
  89.       Left            =   2160
  90.       TabIndex        =   6
  91.       Top             =   1560
  92.       Width           =   1215
  93.    End
  94.    Begin CommandButton Command5 
  95.       Caption         =   "Final Jeopardy!"
  96.       Height          =   495
  97.       Left            =   2160
  98.       TabIndex        =   11
  99.       Top             =   960
  100.       Width           =   2655
  101.    End
  102.    Begin CommandButton Command1 
  103.       Caption         =   "200"
  104.       FontBold        =   -1  'True
  105.       FontItalic      =   0   'False
  106.       FontName        =   "MS Sans Serif"
  107.       FontSize        =   18
  108.       FontStrikethru  =   0   'False
  109.       FontUnderline   =   0   'False
  110.       Height          =   615
  111.       Index           =   2
  112.       Left            =   600
  113.       TabIndex        =   1
  114.       Top             =   960
  115.       Width           =   1095
  116.    End
  117.    Begin CommandButton Command2 
  118.       Caption         =   "Daily Double!"
  119.       Height          =   495
  120.       Left            =   2160
  121.       TabIndex        =   5
  122.       Top             =   360
  123.       Width           =   2655
  124.    End
  125.    Begin CommandButton Command1 
  126.       Caption         =   "100"
  127.       FontBold        =   -1  'True
  128.       FontItalic      =   0   'False
  129.       FontName        =   "MS Sans Serif"
  130.       FontSize        =   18
  131.       FontStrikethru  =   0   'False
  132.       FontUnderline   =   0   'False
  133.       Height          =   615
  134.       Index           =   1
  135.       Left            =   600
  136.       TabIndex        =   0
  137.       Top             =   240
  138.       Width           =   1095
  139.    End
  140.    Begin Label Label3 
  141.       FontBold        =   -1  'True
  142.       FontItalic      =   0   'False
  143.       FontName        =   "MS Sans Serif"
  144.       FontSize        =   24
  145.       FontStrikethru  =   0   'False
  146.       FontUnderline   =   0   'False
  147.       Height          =   615
  148.       Left            =   4320
  149.       TabIndex        =   9
  150.       Top             =   3960
  151.       Width           =   1695
  152.    End
  153.    Begin Label Label4 
  154.       Caption         =   "Your wager:"
  155.       FontBold        =   -1  'True
  156.       FontItalic      =   0   'False
  157.       FontName        =   "MS Sans Serif"
  158.       FontSize        =   24
  159.       FontStrikethru  =   0   'False
  160.       FontUnderline   =   0   'False
  161.       Height          =   615
  162.       Left            =   960
  163.       TabIndex        =   10
  164.       Top             =   3960
  165.       Width           =   3255
  166.    End
  167.    Begin Label Label2 
  168.       Alignment       =   2  'Center
  169.       Caption         =   "0"
  170.       FontBold        =   -1  'True
  171.       FontItalic      =   0   'False
  172.       FontName        =   "Arial"
  173.       FontSize        =   48
  174.       FontStrikethru  =   0   'False
  175.       FontUnderline   =   0   'False
  176.       Height          =   1095
  177.       Left            =   2520
  178.       TabIndex        =   8
  179.       Top             =   2640
  180.       Width           =   3615
  181.    End
  182.    Begin Label Label1 
  183.       Height          =   255
  184.       Left            =   0
  185.       TabIndex        =   12
  186.       Top             =   600
  187.       Width           =   255
  188.    End
  189.    Begin Label direc 
  190.       Caption         =   "Please choose your wager or click on the Daily Double button. If Double Jeopardy or Final Jeopardy starts, click on the approppriate button."
  191.       FontBold        =   0   'False
  192.       FontItalic      =   0   'False
  193.       FontName        =   "MS Sans Serif"
  194.       FontSize        =   8.25
  195.       FontStrikethru  =   0   'False
  196.       FontUnderline   =   0   'False
  197.       Height          =   1215
  198.       Left            =   4920
  199.       TabIndex        =   13
  200.       Top             =   240
  201.       Width           =   1815
  202.    End
  203.    Begin Menu game 
  204.       Caption         =   "&Game"
  205.       Begin Menu new 
  206.          Caption         =   "&New"
  207.          Shortcut        =   {F2}
  208.       End
  209.       Begin Menu ex 
  210.          Caption         =   "E&xit"
  211.          Shortcut        =   ^X
  212.       End
  213.       Begin Menu dash 
  214.          Caption         =   "-"
  215.       End
  216.       Begin Menu abt 
  217.          Caption         =   "&About Jeopardy Scorekeeper..."
  218.       End
  219.    End
  220.    Begin Menu options 
  221.       Caption         =   "&Options"
  222.       Begin Menu savetot 
  223.          Caption         =   "&Save Totals on New Game"
  224.          Shortcut        =   ^S
  225.       End
  226.       Begin Menu bkgcol 
  227.          Caption         =   "&Background Color"
  228.          Begin Menu red 
  229.             Caption         =   "&Red"
  230.          End
  231.          Begin Menu yellow 
  232.             Caption         =   "&Yellow"
  233.          End
  234.          Begin Menu green 
  235.             Caption         =   "&Green"
  236.          End
  237.          Begin Menu blue 
  238.             Caption         =   "&Blue"
  239.          End
  240.          Begin Menu purple 
  241.             Caption         =   "&Purple"
  242.          End
  243.          Begin Menu bluegray 
  244.             Caption         =   "Blue-gr&ay"
  245.          End
  246.          Begin Menu gray 
  247.             Caption         =   "G&ray"
  248.          End
  249.          Begin Menu white 
  250.             Caption         =   "&White"
  251.             Checked         =   -1  'True
  252.          End
  253.       End
  254.    End
  255.    Begin Menu general 
  256.       Caption         =   "&Help"
  257.    End
  258. Sub about_Click ()
  259. MsgBox "Jeopardy! Challenger -- by Jonathan D. Persky. Made in Microsoft Visual Basic 1.0. Requires Microsoft Windows version 3.0 or greater. Must be accompanied by the file VBRUN100.DLL. 
  260. 1992, Jonathan D. Persky.", 0, "Jeopardy! Challenger"
  261. End Sub
  262. Sub abt_Click ()
  263. Load about
  264. about.Show
  265. End Sub
  266. Sub blue_Click ()
  267. red.checked = 0
  268. yellow.checked = 0
  269. green.checked = 0
  270. blue.checked = -1
  271. purple.checked = 0
  272. bluegray.checked = 0
  273. gray.checked = 0
  274. white.checked = 0
  275. k = &HFFFF00
  276. form1.backcolor = k
  277. label1.backcolor = k
  278. label2.backcolor = k
  279. label3.backcolor = k
  280. label4.backcolor = k
  281. End Sub
  282. Sub bluegray_Click ()
  283. red.checked = 0
  284. yellow.checked = 0
  285. green.checked = 0
  286. blue.checked = 0
  287. purple.checked = 0
  288. bluegray.checked = -1
  289. gray.checked = 0
  290. white.checked = 0
  291. k = &H808000
  292. form1.backcolor = k
  293. label1.backcolor = k
  294. label2.backcolor = k
  295. label3.backcolor = k
  296. label4.backcolor = k
  297. End Sub
  298. Sub Command1_Click (index As Integer)
  299. label3.caption = command1(index).caption
  300. p = Val(command1(index).caption)
  301. direc.caption = "Please select the appropriate button if you're right or wrong."
  302. End Sub
  303. Sub Command2_Click ()
  304. response$ = InputBox$("Enter your wager, please:", "Daily Double", "")
  305. If response$ = "" Then
  306.     label3.caption = "0"
  307.     Exit Do
  308. ElseIf Val(label2.caption) > 0 And Val(label2.caption) < Val(response$) Then
  309.     Beep
  310.     label3.caption = "0"
  311.     MsgBox "You have wagered more than you have. Please choose another wager.", 16, "You Can't Do That!"
  312. ElseIf Val(label2.caption) < 1 And Val(response$) > 500 Then
  313.     Beep
  314.     label3.caption = "0"
  315.     MsgBox "Sorry, if you have a negative score you can only wager up to $500.", 16, "You Can't Do That!"
  316. ElseIf Val(response$) < 0 Then
  317.     Beep
  318.     label3.caption = "0"
  319.     MsgBox "Nice try, but you can only wager something positive.", 16, "Didn't Fool Me"
  320.     label3.caption = response$
  321.     p = Val(label3.caption)
  322.     Exit Do
  323. End If
  324. direc.caption = "Please select the appropriate button if you are right or wrong."
  325. End Sub
  326. Sub Command3_Click ()
  327. direc.caption = "Please choose your wager or click on the Daily Double button. If Double Jeopardy or Final Jeopardy starts, click on the approppriate button."
  328. label2.caption = Str$(Val(label2.caption) + p)
  329. If t = 1 Then
  330.     For q = 1 To 10
  331.         command1(q).enabled = 0
  332.     Next q
  333.     command2.enabled = 0
  334.     command3.enabled = 0
  335.     command4.enabled = 0
  336.     command5.enabled = 0
  337.     MsgBox "Game Over", 64, "Jeopardy Scorekeeper"
  338. End If
  339. End Sub
  340. Sub Command4_Click ()
  341. direc.caption = "Please choose your wager or click on the Daily Double button. If Double Jeopardy or Final Jeopardy starts, click on the approppriate button."
  342. label2.caption = Str$(Val(label2.caption) - p)
  343. If t = 1 Then
  344.     For q = 1 To 5
  345.         command1(q).enabled = 0
  346.     Next q
  347.     command2.enabled = 0
  348.     command3.enabled = 0
  349.     command4.enabled = 0
  350.     command5.enabled = 0
  351.     MsgBox "Game Over", 64, "Jeopardy Scorekeeper"
  352. End If
  353. End Sub
  354. Sub Command5_Click ()
  355. If Val(label2.caption) < 1 Then
  356.     MsgBox "Sorry, you haven't earned enough money to play Final Jeopardy!.", 16, "In the Red"
  357.     Exit Sub
  358. End If
  359. response$ = InputBox$("Enter your wager, please", "Final Jeopardy!", "")
  360. If response$ = "" Then
  361.     label3.caption = "0"
  362.     Exit Do
  363. ElseIf Val(label2.caption) > 0 And Val(label2.caption) < Val(response$) Then
  364.     Beep
  365.     label3.caption = "0"
  366.     MsgBox "You have wagered more than you have. Please choose another wager.", 16, "You Can't Do That!"
  367. ElseIf Val(response$) < 0 Then
  368.     Beep
  369.     label3.caption = "0"
  370.     MsgBox "Nice try, but you can only wager something positive.", 16, "Didn't Fool Me"
  371.     label3.caption = response$
  372.     p = Val(label3.caption)
  373.     t = 1
  374.     Exit Do
  375. End If
  376. direc.caption = "Please select the appropriate button if you are right or wrong."
  377. End Sub
  378. Sub Command6_Click ()
  379. command1(1).caption = "100"
  380. command1(2).caption = "200"
  381. command1(3).caption = "300"
  382. command1(4).caption = "400"
  383. command1(5).caption = "500"
  384. End Sub
  385. Sub Command7_Click ()
  386. command1(1).caption = "200"
  387. command1(2).caption = "400"
  388. command1(3).caption = "600"
  389. command1(4).caption = "800"
  390. command1(5).caption = "1000"
  391. End Sub
  392. Sub ex_Click ()
  393. Unload form1
  394. End Sub
  395. Sub general_Click ()
  396. MsgBox "For help on Jeopardy Scorekeeper, use Windows Notepad to open the file JEOPKEEP.TXT.", 48, "Jeopardy Scorekeeper"
  397. End Sub
  398. Sub gray_Click ()
  399. red.checked = 0
  400. yellow.checked = 0
  401. green.checked = 0
  402. blue.checked = 0
  403. purple.checked = 0
  404. bluegray.checked = 0
  405. gray.checked = -1
  406. white.checked = 0
  407. k = &HC0C0C0
  408. form1.backcolor = k
  409. label1.backcolor = k
  410. label2.backcolor = k
  411. label3.backcolor = k
  412. label4.backcolor = k
  413. End Sub
  414. Sub green_Click ()
  415. red.checked = 0
  416. yellow.checked = 0
  417. green.checked = -1
  418. blue.checked = 0
  419. purple.checked = 0
  420. bluegray.checked = 0
  421. gray.checked = 0
  422. white.checked = 0
  423. k = &HFF00&
  424. form1.backcolor = k
  425. label1.backcolor = k
  426. label2.backcolor = k
  427. label3.backcolor = k
  428. label4.backcolor = k
  429. End Sub
  430. Sub new_Click ()
  431. t = 0
  432. For q = 1 To 5
  433.     command1(q).enabled = -1
  434. Next q
  435. command2.enabled = -1
  436. command3.enabled = -1
  437. command4.enabled = -1
  438. command5.enabled = -1
  439. command6.enabled = -1
  440. command7.enabled = -1
  441. command1(1).caption = "100"
  442. command1(2).caption = "200"
  443. command1(3).caption = "300"
  444. command1(4).caption = "400"
  445. command1(5).caption = "500"
  446. label3.caption = ""
  447. If savetot.checked = 0 Then label2.caption = "0"
  448. direc.caption = "Please choose your wager or click on the Daily Double button. If Double Jeopardy or Final Jeopardy starts, click on the approppriate button."
  449. End Sub
  450. Sub option1_click (index As Integer)
  451. If index = 0 Then
  452.     command1(1).caption = "100"
  453.     command1(2).caption = "200"
  454.     command1(3).caption = "300"
  455.     command1(4).caption = "400"
  456.     command1(5).caption = "500"
  457.     command1(1).caption = "200"
  458.     command1(2).caption = "400"
  459.     command1(3).caption = "600"
  460.     command1(4).caption = "800"
  461.     command1(5).caption = "1000"
  462. End If
  463. End Sub
  464. Sub purple_Click ()
  465. red.checked = 0
  466. yellow.checked = 0
  467. green.checked = 0
  468. blue.checked = 0
  469. purple.checked = -1
  470. bluegray.checked = 0
  471. gray.checked = 0
  472. white.checked = 0
  473. k = &HFF00FF
  474. form1.backcolor = k
  475. label1.backcolor = k
  476. label2.backcolor = k
  477. label3.backcolor = k
  478. label4.backcolor = k
  479. End Sub
  480. Sub red_Click ()
  481. red.checked = -1
  482. yellow.checked = 0
  483. green.checked = 0
  484. blue.checked = 0
  485. purple.checked = 0
  486. bluegray.checked = 0
  487. gray.checked = 0
  488. white.checked = 0
  489. k = &HFF&
  490. form1.backcolor = k
  491. label1.backcolor = k
  492. label2.backcolor = k
  493. label3.backcolor = k
  494. label4.backcolor = k
  495. End Sub
  496. Sub savetot_Click ()
  497. If savetot.checked = -1 Then
  498.     savetot.checked = 0
  499.     savetot.checked = -1
  500. End If
  501. End Sub
  502. Sub white_Click ()
  503. red.checked = 0
  504. yellow.checked = 0
  505. green.checked = 0
  506. blue.checked = 0
  507. purple.checked = 0
  508. bluegray.checked = 0
  509. gray.checked = 0
  510. white.checked = -1
  511. k = &HFFFFFF
  512. form1.backcolor = k
  513. label1.backcolor = k
  514. label2.backcolor = k
  515. label3.backcolor = k
  516. label4.backcolor = k
  517. End Sub
  518. Sub yellow_Click ()
  519. red.checked = 0
  520. yellow.checked = -1
  521. green.checked = 0
  522. blue.checked = 0
  523. purple.checked = 0
  524. bluegray.checked = 0
  525. gray.checked = 0
  526. white.checked = 0
  527. k = &HFFFF&
  528. form1.backcolor = k
  529. label1.backcolor = k
  530. label2.backcolor = k
  531. label3.backcolor = k
  532. label4.backcolor = k
  533. End Sub
  534.